/**
* 各种模板
*/
<!---->
<!---->
<!--表单-详情-回显-图片-文件-->
<!-- <el-form-item label="证件图片" v-if="dialogData.type=='info'">-->
<!--         &lt;!&ndash; $F.getUrl(scope.row.certificateImg,'fullUrl')&ndash;&gt;-->
<!--         <el-image v-for="(item, index) in $F.parsJsonArray(mFormData.certificateImg)"-->
<!--     style="width: 80px; height: 80px;margin: 5px"-->
<!-- :src="$F.nullDefault(item.full_url,'http:www.baidu.com/aaa.png')"-->
<!-- :preview-src-list="$F.strToArray(item.full_url)">-->
<!--         </el-image>-->
<!-- </el-form-item>-->
<!---->
<!---->
<!--表单-编辑-回显-图片-文件-->
<!-- <el-form-item label="应用LOGO(1张)" prop="logo" :show-message="false">-->
<!--         <UploadFileList-->
<!-- :limit="5" :listType="'picture-card'"-->
<!-- :maxSize="1"-->
<!-- :url="uploadUrl"-->
<!-- :fileList="fileLogo.fileList"-->
<!-- @nowFileData="uploadBackLogo"/>-->
<!-- </el-form-item>-->
fileLogo: any = {fileList: [], dataArray: []};

//文件上传回调
uploadBackLogo(fileData: any) {
//console.log("uploadBackImage", fileData);
this.fileLogo = fileData;
}
//添加前的初始化
initInsert() {
this.mFormData = {};
this.fileLogo = {fileList: [], dataArray: []};
}
//还原修改的数据
cancelUpdate() {
this.baseCancelUpdate();
this.fileLogo.fileList = addBaseUrl(this.mFormData.logo);
}
//检查文件上传情况
checkFile() {
if (fileDataIsNull(this.fileLogo.dataArray)) {
errorMsg("请上应用LOGO！");
return false;
}
if (fileDataIsNull(this.fileVideo.dataArray)) {
this.mFormData.video = "[]";
} else {
this.mFormData.video = JSON.stringify(this.fileVideo.dataArray);
}
this.mFormData.logo = JSON.stringify(this.fileLogo.dataArray);
return true;
}

//展示详情
async showInfo(index: any, row: any) {
this.fileLogo.fileList = addBaseUrl(row.logo);
this.fileLogo.dataArray = JSON.parse(row.logo);
}

//展示编辑Dialog
async showEditor(index: any, row: any) {
this.fileLogo.fileList = addBaseUrl(row.logo);
this.fileLogo.dataArray = JSON.parse(row.logo);
}


//执行修改
startUpdate() {
if (this.checkFile()) {
(this.$refs.mFormData as ElForm).validate((valid: boolean) => {
if (valid) {
this.baseStartUpdate(API.adminProvideUpdateInfo);
} else {
errorMsg("表单内容填写错误，请检查！")
}
});
}
}

//执行添加
async startInsert() {
if (this.checkFile()) {
(this.$refs.mFormData as ElForm).validate((valid: boolean) => {
if (valid) {
this.baseStartInsert(API.adminProvideInsert);
} else {
errorMsg("表单内容填写错误，请检查！")
}
});
}
}



